#ifndef SEMANTICNODEMETHODBODY_H_
#define SEMANTICNODEMETHODBODY_H_

#include <string>
#include <sstream>
#include <vector>
#include <map>
#include "SemanticNode.h"

#include "../syntax_tree.h"
#include "../main_container.h"


extern MainContainer *CompilerData;


//TODO brisi
#include "OurSemanticAnalyzer.h"



class SemanticNodeMethodBody : public SemanticNode {

private:

	// sve naredbe redosljedom kojim se pojavljuju u kodu
	std::vector<SemanticNode*> statements;

	// sve labele
	// kljuc je naziv labele, a vrijednost pripadna naredba (ta naredba se mora nalaziti u vektoru statements)
	std::map<std::string, SemanticNode*> labels;

	// definicije svih varijabli
	std::vector<SemanticNodeVariableDefinition*> variables;


	void addVariable (SemanticNodeVariableDefinition *var);

public:

	SemanticNodeMethodBody (SyntaxTreeNode *syntaxNode, SemanticNode *parent);

	std::string toDebugString (int tab);

};

#endif /* SEMANTICNODEMETHODBODY_H_ */
